<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
    String loginPath=basePath+"admin/users/updateP";
%>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <base href="<c:url value="/" />">
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <title> 更新用户</title>
    <link rel="stylesheet" href="css/bootstrap.min.css">
    <script src="js/jquery-1.11.3.js"></script>
    <script src="js/bootstrap-min.3.3.5.js"></script>
    <script src="js/bootstrap-paginator.js"></script>
</head>
<body>
<jsp:include page="../include/top.jsp"></jsp:include>
<div class="container">
    <h1>修改用户信息</h1>
    <hr/>
    <form:form action="<%=loginPath%>" method="post" commandName="userP" role="form">
        <div class="form-group">
            <label for="nickname">登录名:</label>
            <input type="text" class="form-control" id="nickname" name="nickname" placeholder="Enter Nickname:"
                   value="${user.nickname}"/>
        </div>

        <div class="form-group">
            <label for="password">密码:</label>
            <input type="text" class="form-control" id="password" name="password" placeholder="Enter Password:"
                   value="${user.password}"/>
        </div>
        <!-- 把 id 一并写入 userP 中 -->
        <input type="hidden" id="id" name="id" value="${user.id}"/>
        <div class="form-group">
            <button type="submit" class="btn btn-sm btn-success">提交</button>
        </div>
    </form:form>
</div>

</body>
</html>